from flask import Flask
##配置数据库
from flask import current_app
from flask import session

from redis import StrictRedis
## 可以用来指定session
from flask_session import Session
from flask_script import Manager
from flask_migrate import MigrateCommand, Migrate
from config import Config
from info import create_app,db,models


# 通过指定的配置名字创建对应配置的app
# create_app（）类似于工厂方法
app = create_app("development")

manager = Manager(app)
Migrate(app, db)
manager.add_command('db', MigrateCommand)




if __name__ == '__main__':
    manager.run()
